import { $post_, $put_ } from '@js/request'

// 添加
export async function addRequest (d: any): Promise<void> {
  const res = await $post_('/api/common/role', d)
  return res.data
}

// 修改
export async function updateRequest (d: any): Promise<void> {
  const id = d.id as string
  delete d.id
  const res = await $put_(`/api/common/role/${id}`, d)
  return res.data
}
